home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds.fmt / ls.man < prev    next >
Encoding:
Text File  |  1989-10-31  |  5.8 KB  |  199 lines

  1.  
  2.  
  3.  
  4. LS                        User Commands                        LS
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      ls - list contents of directory
  10.  
  11. SSYYNNOOPPSSIISS
  12.      llss [ --aaccddffggiillqqrrssttuu11AACCLLFFRR ] name ...
  13.  
  14. DDEESSCCRRIIPPTTIIOONN
  15.      For each directory argument, _l_s lists the contents of the
  16.      directory; for each file argument, _l_s repeats its name and
  17.      any other information requested.  By default, the output is
  18.      sorted alphabetically.  When no argument is given, the
  19.      current directory is listed.  When several arguments are
  20.      given, the arguments are first sorted appropriately, but
  21.      file arguments are processed before directories and their
  22.      contents.
  23.  
  24.      There are a large number of options:
  25.  
  26.      --ll   List in long format, giving mode, number of links,
  27.           owner, size in bytes, and time of last modification for
  28.           each file.  (See below.) If the file is a special file
  29.           the size field will instead contain the major and minor
  30.           device numbers.  If the file is a symbolic link the
  31.           pathname of the linked-to file is printed preceded by
  32.           ``->''.
  33.  
  34.      --gg   Include the group ownership of the file in a long out-
  35.           put.
  36.  
  37.      --tt   Sort by time modified (latest first) instead of by
  38.           name.
  39.  
  40.      --aa   List all entries; in the absence of this option,
  41.           entries whose names begin with a period (..) are _n_o_t
  42.           listed.
  43.  
  44.      --ss   Give size in kilobytes of each file.
  45.  
  46.      --dd   If argument is a directory, list only its name; often
  47.           used with --ll to get the status of a directory.
  48.  
  49.      --LL   If argument is a symbolic link, list the file or direc-
  50.           tory the link references rather than the link itself.
  51.  
  52.      --rr   Reverse the order of sort to get reverse alphabetic or
  53.           oldest first as appropriate.
  54.  
  55.      --uu   Use time of last access instead of last modification
  56.           for sorting (with the --tt option) and/or printing (with
  57.           the --ll option).
  58.  
  59.      --cc   Use time when file status was last changed for sorting
  60.  
  61.  
  62.  
  63. Sprite v1.0            September 30, 1987                       1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. LS                        User Commands                        LS
  71.  
  72.  
  73.  
  74.           or printing.
  75.  
  76.      --ii   For each file, print the i-number in the first column
  77.           of the report.
  78.  
  79.      --ff   Force each argument to be interpreted as a directory
  80.           and list the name found in each slot.  This option
  81.           turns off --ll,, --tt,, --ss,, and --rr,, and turns on --aa;; the
  82.           order is the order in which entries appear in the
  83.           directory.
  84.  
  85.      --FF   cause directories to be marked with a trailing `/',
  86.           sockets with a trailing `=', symbolic links with a
  87.           trailing `@', and executable files with a trailing `*'.
  88.  
  89.      --RR   recursively list subdirectories encountered.
  90.  
  91.      --11   force one entry per line output format; this is the
  92.           default when output is not to a terminal.
  93.  
  94.      --CC   force multi-column output; this is the default when
  95.           output is to a terminal.
  96.  
  97.      --qq   force printing of non-graphic characters in file names
  98.           as the character `?'; this is the default when output
  99.           is to a terminal.
  100.  
  101.      The mode printed under the --ll option contains 11 characters
  102.      which are interpreted as follows: the first character is
  103.  
  104.      dd  if the entry is a directory;
  105.      bb  if the entry is a block-type special file;
  106.      cc  if the entry is a character-type special file;
  107.      ll  if the entry is a symbolic link;
  108.      rr  if the entry is a remote link;
  109.      ss  if the entry is a socket, or
  110.      --  if the entry is a plain file.
  111.  
  112.      The next 9 characters are interpreted as three sets of three
  113.      bits each.  The first set refers to owner permissions; the
  114.      next refers to permissions to others in the same user-group;
  115.      and the last to all others.  Within each set the three char-
  116.      acters indicate permission respectively to read, to write,
  117.      or to execute the file as a program.  For a directory, `exe-
  118.      cute' permission is interpreted to mean permission to search
  119.      the directory.  The permissions are indicated as follows:
  120.  
  121.      rr  if the file is readable;
  122.      ww  if the file is writable;
  123.      xx  if the file is executable;
  124.      --  if the indicated permission is not granted.
  125.  
  126.  
  127.  
  128.  
  129. Sprite v1.0            September 30, 1987                       2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. LS                        User Commands                        LS
  137.  
  138.  
  139.  
  140.      The group-execute permission character is given as ss if the
  141.      file has the set-group-id bit set; likewise the user-execute
  142.      permission character is given as ss if the file has the set-
  143.      user-id bit set.  These are given as SS (capitalized) if the
  144.      corresponding execute permission is NOT set.
  145.  
  146.      The last character of the mode (normally `x' or `-') is tt if
  147.      the 1000 bit of the mode is on.  See _c_h_m_o_d(1) for the mean-
  148.      ing of this mode.  This is given as TT (capitalized) if the
  149.      corresponding execute permission is NOT set.
  150.  
  151.      When the sizes of the files in a directory are listed, a
  152.      total count of blocks, including indirect blocks is printed.
  153.  
  154. FFIILLEESS
  155.      /etc/passwd to get user id's for `ls -l'.
  156.      /etc/group to get group id's for `ls -g'.
  157.  
  158. BBUUGGSS
  159.      Newline and tab are considered printing characters in file
  160.      names.
  161.  
  162.      The output device is assumed to be 80 columns wide.
  163.  
  164.      The option setting based on whether the output is a teletype
  165.      is undesirable as ``ls -s'' is much different than
  166.      ``ls -s | lpr''.  On the other hand, not doing this setting
  167.      would make old shell scripts which used _l_s almost certain
  168.      losers.
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195. Sprite v1.0            September 30, 1987                       3
  196.  
  197.  
  198.  
  199.